package com.htl.实用类;

public class Math__test {
    public static void main(String[] args) {
        //自然对数的底数
        System.out.println(Math.E);
        //圆周率
        System.out.println(Math.PI);
        //9开平方
        System.out.println(Math.sqrt(9));
        //8开立方
        System.out.println(Math.cbrt(8));
        //2的3次方
        System.out.println(Math.pow(2, 3));
        //比较大小
        System.out.println(Math.max(6, 3));
        System.out.println(Math.min(6, 3));
        //求绝对值
        System.out.println(Math.abs(-10));
        //向下取整
        System.out.println(Math.floor(10.999));
        //向上取整
        System.out.println(Math.ceil(10.001));
        //四舍五入
        System.out.println(Math.round(5.6f));
        //取随机数
        System.out.println(Math.random());
    }
}
